<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>编辑书籍</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<a href="#">编辑书籍</a>
<div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <form action="" method="post">   <!-- action 可以什么都不写，默认发到当前页面 /books/edit/{{ edit_book.nid }} -->
                {% csrf_token %}
                <div class="form-group"><label for="title">书籍名称</label>
                    <input type="text" value="{{ edit_book.title }}" class="form-control" id="title" placeholder="Title" name="title">
                </div>
                <div class="form-group"><label for="price">价格</label>
                    <input type="text" value="{{ edit_book.price }}" class="form-control" id="price" placeholder="Price" name="price">
                </div>
                <div class="form-group"><label for="pub_date">出版日期</label>
                    <input type="date" value="{{ edit_book.pub_date|date:'Y-m-d'}}" class="form-control" id="pub_date" placeholder="pub_date" name="pub_date">
                </div>
                <div class="form-group"><label for="publish">出版社</label>
                    <input type="text" value="{{ edit_book.publish }}" class="form-control" id="publish" placeholder="publish" name="publish">
                </div>
                <button type="submit" class="btn btn-success pull-right">Submit</button>
            </form>
        </div>
    </div>
</div>

</body>
</html>
